package common;

import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Igor Demidov
 * Date: 16.02.13
 * Time: 17:55
 */
public class User implements Serializable {
    private String name;
    private String surname;
    private Date registrationDate;
    private String phone;
    private LoginPassword loginPassword;
    //private List<Folder> inbox;
    //private List<Folder> outbox;

    public User(String name, String surname, Date registrationDate, String phone, LoginPassword loginPassword) {
        this.name = name;
        this.surname = surname;
        this.registrationDate = registrationDate;
        this.phone = phone;
        this.loginPassword = loginPassword;
        //this.inbox = new LinkedList<Folder>();
        //inbox.add(new Folder("Default"));
        //this.outbox = new LinkedList<Folder>();
        //outbox.add(new Folder("Default"));
    }

    public Date getRegistrationDate() {
        return registrationDate;
    }

    public String getPhone() {
        return phone;
    }

    public LoginPassword getLoginPassword() {
        return loginPassword;
    }

    public String getName() {
        return name;
    }

    public String getSurname() {
        return surname;
    }

    /*
    public List<Email> getDefaultInboxFolder() {
        return inbox.get(0).getEmails();
    }

    public List<Email> getDefaultOutboxFolder() {
        return outbox.get(0).getEmails();
    }

    public void addToDefaultInboxFolder(Email email) {
        inbox.get(0).addEmail(email);
    }

    public void addToDefaultOutboxFolder(Email email) {
        outbox.get(0).addEmail(email);
    }
    */

    @Override
    public String toString() {
        return "name: " + name + ", surname: " + surname + ", " + loginPassword.toString();
    }
}
